Sheesh. Fix a bug I introduced yesterday in pocketfms_wp highlighting
authorrobertlipe <robertlipe@gmail.com>
Sat, 8 Dec 2012 16:57:37 +0000 (16:57 +0000)
committerrobertlipe <robertlipe@gmail.com>
Sat, 8 Dec 2012 16:57:37 +0000 (16:57 +0000)
the very style of code I so badly want to replace.

gpsbabel/pocketfms_wp.c

index a43dce3fba43686394e481a3d022b0ad538de65a..d7c9c3a9d475ce2e2b9dad49978f67550e624bfe 100644 (file)
@@ -106,7 +106,7 @@ enigma_waypt_disp(const waypoint *wpt)
   if (wpt->shortname) {
     // The output might have a space or control character.
     int i, l = strlen(wpt->shortname);
-    t = xmalloc(l);
+    t = xmalloc(l + 1);
     char *d = t;
     for (i = 0; i < l; i++) {
       char s = wpt->shortname[i];